process.env.VUE_APP_VERSION = require('./package.json').version

module.exports = {
  configureWebpack: {
    node: {
      fs: 'empty',
      __dirname:false
    }
  },
  pluginOptions: {
    electronBuilder: {
      builderOptions: {
        appId: 'com.example.app',
        productName: 'setup', // 文件名称
        copyright: 'Copyright © 2020', // 版权信息
        directories: {
          output:'./dist' // 输出文件路径
        },
        protocols: [
          {
            name: 'xue5hen://',
            schemes: [ 'irc', 'ircs' ]
          }
        ],
        win: { // win相关配置
          icon: 'public/favicon.ico',
          target: [
            {
              target: 'nsis', // 利用nsis制作安装程序
              arch: [
                // 'x64',
                'ia32'
              ]
            }
          ]
        },
        mac: {
          icon: 'public/favicon.icns',
          target: ['dmg']
        }
      }
    }
  }
}
